Credits:

Display tax info Version 4.2
by @raiwa 
info@oscaddons.com
www.oscaddons.com

Compatibility:
Phoenix Cart 1.0.7.12+
Tested with Phoenix 1.0.7.16
PHP 7.0 - 7.4

Based on:
Original version:
By www.tim-international.net
http://addons.oscommerce.com/info/6725

And:
Tax info 1.6
http://addons.oscommerce.com/info/2788
**********************************************************************
Complete new modularized version.
All Configuration entries, language definitions and styleshhets included in one store module and one siteWide hook.
Copy the modules and language files.
That's all.

Support Forum:
http://forums.oscommerce.com/topic/408405-display-tax-info-v30/
**********************************************************************

What does this version do:

It will display the following below the price on each page included in the module:

1. If the tax value of the displayed price is = 0:
	Shows: "VAT excl." or any other text you define in the language file

2. If the tax value of the displayed price is not = 0:
	Shows: "XX% VAT incl." or any other text you define in the language file
	Where XX is the value of the tax in percentage as defined in admin/tax rates
	
Note: For other languages/uses its possible to define a text string before the tax rate and another after the tax rate:
		  Example: for german it will look like this: "inkl. XX % MwSt."
      
/********************************/
NOTE: Make sure you are using the "override" template and have it selected in:
Admin : Configuration : My Store : Template Selection
Otherwise you must copy:
  templates/override/includes/hooks/shop/siteWide/priceTax.php
TO:
  templates/YOUR SELECTED TEMPLATE/includes/hooks/shop/siteWide/priceTax.php
/********************************/

**********************************************************************
Changelog Version 4.2

- updated for Phoenix 1.0.7.12+
- updated QtPro support.
- updated options images support.
- moved siteWide hook to override templates. 
- updated admin cfg module
- general code cleanup and modernization to match actual core code

**********************************************************************
Changelog Version 4.1

- updated for Phoenix 1.0.7.7+
- fixed wrong setting in currencies class extension which prevented price calculation for multi currencies. Thanks to @Gold1s for the report
- moved siteWide hook to templates. 
- updated admin cfg module
- updated currencies class extension to match core class
- added hook warning to store module

**********************************************************************
Changelog Version 4.0

- updated for Phoenix 1.0.3.x
- moved currencies_mod class extension into siteWide hook. This allows to use it also for modularized shopping cart and other modularized pages with content module call in data section of the page.

**********************************************************************
Changelog Version 3.5

- updated instructions for Phoenix
- added modified options attributes product info module. (Supplied files are for Phoenix 1.0.2.x)
- added support for addons options images and QTPro.

**********************************************************************
Changelog Version 3.4

- hardcoded database table names

**********************************************************************
Changelog Version 3.3

- update class constructor name for PHP 7 compatibility
- add space between number and currency symbol to show nicer prices

**********************************************************************
Changelog Version 3.2

- added instructions to fix not showing tax info in product_reviews.php and product_reviews_write.php. Thanks to @baulie38 for the report and testing

**********************************************************************
Changelog Version 3.1r2


**********************************************************************
Changelog Version 3.1r1

- error fix for multi currencies. Thanks to @Mene for the report

Update Version 3.1 to 3.1r1 (Standard AND Bootstrap):

Step 1 upload and replace: catalog/includes/modules/store/st_tax_below_price.php

**********************************************************************
Changelog Version 3.1

- div tag changed to span for better compatibility and validation
- hide style rule for <s> added for add-ons using <s> tag instead of <del> tag for special price
- standard and bootstrap versions unified

**********************************************************************

How it works:

This version checks if the tax rate of the actually displayed price is = 0 
and
If "Display Prices with Tax = false" in admin/My Store.

So it should display (couldn't test any imaginable combination) always the correct text string including the amount of the tax rate
for any combination of different tax rates for different products and destination zones.

This version modifies the "display_price" and "format" functions in "includes/classes/currencies.php".
So it will apply on all pages, modules, boxes etc. where the function "display_price" is used to show the price of the products, including all third party Add-Ons.
No need to modify each file.
**********************************************************************

Instalation:

0. Backup your database
00. Backup your files

Use the files included in the catalog folder.

1. Copy the following new files from the "Upload" folder:
[catalog]/admin/includes/languages/english/modules/cfg_modules/cfgm_store.php
[catalog]/admin/includes/languages/espanol/modules/cfg_modules/cfgm_store.php
[catalog]/admin/includes/languages/german/modules/cfg_modules/cfgm_store.php
[catalog]/admin/includes/modules/cfg_modules/cfgm_store.php

2. Copy the following new folder and included files from the "Upload" folder:
[catalog]/includes/languages/english/hooks/shop/siteWide/priceTax.php
[catalog]/includes/languages/espanol/hooks/shop/siteWide/priceTax.php
[catalog]/includes/languages/german/hooks/shop/siteWide/priceTax.php
[catalog]/includes/languages/english/modules/store/st_tax_below_price.php
[catalog]/includes/languages/espanol/modules/store/st_tax_below_price.php
[catalog]/includes/languages/german/modules/store/st_tax_below_price.php
[catalog]/includes/modules/store/st_tax_below_price.php
[catalog]templates/override[or_your_template_name]/includes/hooks/shop/siteWide/priceTax.php


3. Point your browser to your Admin:
   
Admin > Modules > Store:
Install Module: Tax below Price

***************************************************************************************************************************************************************************
OPTIONAL:

5.  Support for Option Images Phoenix 2.0 App:
Modify Options Images module to supress tax info in the options drop down:
If If you are using Phoenix 1.0.7.12 and your file is unmodified, upload and replace:
Options Images support/[catalog]/includes/modules/content/product_info/cm_pi_options_images.php
OR
Options Images support/[catalog]/includes/modules/pi/product_info/pi_options_images.php
Otherwise apply the modification point 7

6.  Support for QTPro 7.3.0.+ App:
Modify qtpro attributes and table module to remove html tags for tax info:
If If you are using Phoenix 1.0.7.12+ and your files are unmodified, upload and replace:
Otherwise apply the modification point 7 to remove the tax info.

7. Suppress tax info in certain places:
If you for any reason wish to use the original function with no Tax information in a concrete module box etc. as an exception, 
apply the following modification to the "display_price" function:
Add "false" as the forth parameter of the "display_price" function.

With quantity parameter:
Find:
    $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty'])
Replace by:
    $currencies->display_price($total_price, tep_get_tax_rate($products_facts['products_tax_class_id']), $order->products[$i]['qty'], false)

Without quantity parameter:
Find:
    $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'])
Replace by:
    $currencies->display_price($total_price, tep_get_tax_rate($products_facts['products_tax_class_id']), 1, false)

***************************************************************************************************************************************************************************
Configuration Settings:

Enable Tax Below Price Module
True

Enables the module

Display tax amount
True
Set to true shows the amount of tax: "XX% VAT incl."
Set to false shows only the text: "VAT incl."

Pages
Select the pages where show Tax below Price.
***************************************************************************************************************************************************************************
That's it
***************************************************************************************************************************************************************************
